package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee employee);


    List<Employee> queryForList(QueryObject qo);

    void insertRelation(@Param("employeeid") Long employeeid, @Param("roleId") Long roleId);

    void deleteRelation(Long  employeeId);

    void batchDelete(Long[] ids);

    Employee queryByUsername(String username);

    List<Employee> queryByRoleSn(@Param("roleSns") String[] roleSns);
}
